{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Matplotlib项目应用\n",
    "\n",
    "讲师： 沈福利\n",
    "\n",
    "本章节目标\n",
    "\n",
    "我们使用 Kaggle: Titanic 数据，通过matplotlib做数据的可视化操作\n",
    "* Python pandas 数据加载，数据清理\n",
    "* 柱状图Bar Plots, 直方图Histograms, subplot2grid\n",
    "* 散点图Scatter Plots, subplots"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用Matplotlib 对Kaggle: Titanic数据可视化"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 导入包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib as mpl\n",
    "import seaborn\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')\n",
    "# 设置绘图的全局参数\n",
    "\n",
    "# 中文乱码问题\n",
    "from matplotlib.font_manager import _rebuild\n",
    "_rebuild()\n",
    "plt.rcParams['font.sans-serif']=[u'SimHei']\n",
    "plt.rcParams['axes.unicode_minus']=False"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 加载Titanic数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>survived</th>\n",
       "      <th>pclass</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>sibsp</th>\n",
       "      <th>parch</th>\n",
       "      <th>fare</th>\n",
       "      <th>embarked</th>\n",
       "      <th>class</th>\n",
       "      <th>who</th>\n",
       "      <th>adult_male</th>\n",
       "      <th>deck</th>\n",
       "      <th>embark_town</th>\n",
       "      <th>alive</th>\n",
       "      <th>alone</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>man</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>no</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>C</td>\n",
       "      <td>First</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>C</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>yes</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>female</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>yes</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>S</td>\n",
       "      <td>First</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>C</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>yes</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>man</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>no</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   survived  pclass     sex   age  sibsp  parch     fare embarked  class  \\\n",
       "0         0       3    male  22.0      1      0   7.2500        S  Third   \n",
       "1         1       1  female  38.0      1      0  71.2833        C  First   \n",
       "2         1       3  female  26.0      0      0   7.9250        S  Third   \n",
       "3         1       1  female  35.0      1      0  53.1000        S  First   \n",
       "4         0       3    male  35.0      0      0   8.0500        S  Third   \n",
       "\n",
       "     who  adult_male deck  embark_town alive  alone  \n",
       "0    man        True  NaN  Southampton    no  False  \n",
       "1  woman       False    C    Cherbourg   yes  False  \n",
       "2  woman       False  NaN  Southampton   yes   True  \n",
       "3  woman       False    C  Southampton   yes  False  \n",
       "4    man        True  NaN  Southampton    no   True  "
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_train = pd.read_csv('data/titanic.csv',index_col = 0)\n",
    "df_train.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "sexes  =  ['female' 'male']\n",
      "genders_mapping is = {'female': 0, 'male': 1}\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>survived</th>\n",
       "      <th>pclass</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>sibsp</th>\n",
       "      <th>parch</th>\n",
       "      <th>fare</th>\n",
       "      <th>embarked</th>\n",
       "      <th>class</th>\n",
       "      <th>who</th>\n",
       "      <th>adult_male</th>\n",
       "      <th>deck</th>\n",
       "      <th>embark_town</th>\n",
       "      <th>alive</th>\n",
       "      <th>alone</th>\n",
       "      <th>sex_val</th>\n",
       "      <th>age_fill</th>\n",
       "      <th>family_size</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>man</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>no</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>C</td>\n",
       "      <td>First</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>C</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>yes</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>female</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>yes</td>\n",
       "      <td>True</td>\n",
       "      <td>0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>S</td>\n",
       "      <td>First</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>C</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>yes</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>man</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>no</td>\n",
       "      <td>True</td>\n",
       "      <td>1</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   survived  pclass     sex   age  sibsp  parch     fare embarked  class  \\\n",
       "0         0       3    male  22.0      1      0   7.2500        S  Third   \n",
       "1         1       1  female  38.0      1      0  71.2833        C  First   \n",
       "2         1       3  female  26.0      0      0   7.9250        S  Third   \n",
       "3         1       1  female  35.0      1      0  53.1000        S  First   \n",
       "4         0       3    male  35.0      0      0   8.0500        S  Third   \n",
       "\n",
       "     who  adult_male deck  embark_town alive  alone  sex_val  age_fill  \\\n",
       "0    man        True  NaN  Southampton    no  False        1      22.0   \n",
       "1  woman       False    C    Cherbourg   yes  False        0      38.0   \n",
       "2  woman       False  NaN  Southampton   yes   True        0      26.0   \n",
       "3  woman       False    C  Southampton   yes  False        0      35.0   \n",
       "4    man        True  NaN  Southampton    no   True        1      35.0   \n",
       "\n",
       "   family_size  \n",
       "0            1  \n",
       "1            1  \n",
       "2            0  \n",
       "3            1  \n",
       "4            0  "
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取sex 的唯一的数值\n",
    "sexes = np.unique(df_train['sex'])\n",
    "print('sexes  = ',sexes)\n",
    "\n",
    "# sex -Index  : {\"female\":0,\"male\":1}\n",
    "\n",
    "k = sexes\n",
    "v = range(0,len(sexes))\n",
    "genders_mapping  = dict(zip(k,v))\n",
    "print('genders_mapping is =',genders_mapping)\n",
    "\n",
    "# Transform sex from string to a number \n",
    "df_train['sex_val'] = df_train['sex'].map(genders_mapping).astype(int)\n",
    "\n",
    "# 年龄空值的数据处理\n",
    "df_train['age_fill'] = df_train['age']\n",
    "\n",
    "df_train['age_fill'] = df_train.groupby(['sex_val','pclass'])['age'].apply(lambda x:x.fillna(x.median()))\n",
    "    \n",
    "\n",
    "# 家庭人数\n",
    "df_train['family_size'] = df_train['sibsp'] + df_train['parch']\n",
    "df_train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "Int64Index: 891 entries, 0 to 890\n",
      "Data columns (total 18 columns):\n",
      "survived       891 non-null int64\n",
      "pclass         891 non-null int64\n",
      "sex            891 non-null object\n",
      "age            714 non-null float64\n",
      "sibsp          891 non-null int64\n",
      "parch          891 non-null int64\n",
      "fare           891 non-null float64\n",
      "embarked       889 non-null object\n",
      "class          891 non-null object\n",
      "who            891 non-null object\n",
      "adult_male     891 non-null bool\n",
      "deck           203 non-null object\n",
      "embark_town    889 non-null object\n",
      "alive          891 non-null object\n",
      "alone          891 non-null bool\n",
      "sex_val        891 non-null int64\n",
      "age_fill       891 non-null float64\n",
      "family_size    891 non-null int64\n",
      "dtypes: bool(2), float64(3), int64(6), object(7)\n",
      "memory usage: 120.1+ KB\n"
     ]
    }
   ],
   "source": [
    "df_train.info()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 柱状图Bar Plots, 直方图Histograms, subplot2grid"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    549\n",
       "1    342\n",
       "Name: survived, dtype: int64"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = df_train['survived'].value_counts()\n",
    "x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0, 1]"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(x.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[549, 342]"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(x.values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5,1,'age hist')"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEFCAYAAAD36MwKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAHu9JREFUeJzt3XucHFWd9/HPNyQhkEAMyQAhXAb1IQKyETIiapQQIFwMIN5eLAsSWI3LekNUBFfY0X2hII/7EBXR7KMGEY2s8YKgCwkQBCTghECiQLhokMjFJDwGAnIJ+T1/nDOm0+mZ6SQ9Uz013/fr1a+pPlV96lc11b8+fep0lSICMzMrj0FFB2BmZo3lxG5mVjJO7GZmJePEbmZWMk7sZmYl48Reg6RTJH2jjuWGSfqBpJ3qrHewpD3qWGZIvbHWeP12kr4paSdJcyVtU2OZfSXdXDlP0jmSjqqx7GRJ+0i6QtLRko6SNErSOyV9bkvjNLPeM7joAJqFpFvyZAAtwEhJ++WyEcBHImKhpG2BdRHxCnAksGdEPF1V11BgfUSsk/RhYALwamA00AF8sJtQPggcAPyrpEuBY4G/AG35tXsCX4qIyyVtD8wEXsmvnZ1j3Tkinpb0G2A34LGqdYwFns/b0OlM4Lga8YwF/hF4iXS8zATelB9rutkOMyuIE3sWEYd2Tkt6DzApIs6qsej1wE6SXgJeDzwkqaNi/iBge+AC4Grgmvz3v4FjIuJJSac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g/r7/QY8asWTVLYu/xkgR9QdLxwMeA44AnC4ppGqmlPAeYSLomSlH75hk2XNPnD8DyAmM5D7g8IlpJSXyfAmMxa2rNktgLvySBpF2BTwPTIuLZomKKiJMjYhJwErAIuAyYKmkQcGhfxZEtAjqvx/JaUpIvKpYdgBfy9IvAHQXGYtbUmiWxN8MlCU4DxgLXS7oNGNIEMQF8FTiWdAOT6yLi4b5acUTcAayW9FtSUn9/UbGQPuDOlHQHqY/9xAJjMWtq/uWpmVnJNEuL3czMGsSJ3cysZJzYzcxKxondzKxknNjNzErGid3MrGT+PzJ0BZJ2apjjAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 4 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# size of matplotlib figures that contain subplots\n",
    "\n",
    "figsize_with_subplots = (10,10)\n",
    "fig_dims = (3,2)\n",
    "plt.subplot2grid(fig_dims,(0,0))\n",
    "\n",
    "\n",
    "# plot death and survial counts\n",
    "df_train['survived'].value_counts().\\\n",
    "                plot(kind='bar',title='幸存和遇难的数',color = 'r',align = 'center')\n",
    "\n",
    "# plot sex counts\n",
    "plt.subplot2grid(fig_dims,(1,0))\n",
    "df_train['sex'].value_counts().plot(kind='bar',title = 'genders count')\n",
    "plt.xticks(rotation = 0)\n",
    "\n",
    "# plot embarked counts\n",
    "plt.subplot2grid(fig_dims,(1,1))\n",
    "df_train['embarked'].value_counts().plot(kind='bar',title = 'embarked bar')\n",
    "\n",
    "# plot the age \n",
    "plt.subplot2grid(fig_dims,(2,0))\n",
    "df_train['age'].hist()\n",
    "plt.title('age hist')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Histograms 直方图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "family_size is =  [ 0  1  2  3  4  5  6  7 10]\n"
     ]
    }
   ],
   "source": [
    "family_size = np.unique(df_train['family_size'])\n",
    "print('family_size is = ',family_size)\n",
    "\n",
    "df1 = df_train[df_train['survived']==0]['family_size']\n",
    "df2 = df_train[df_train['survived']==1]['family_size']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1\n",
       "4    0\n",
       "5    0\n",
       "6    0\n",
       "7    4\n",
       "Name: family_size, dtype: int64"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1    1\n",
       "2    0\n",
       "3    1\n",
       "8    2\n",
       "9    1\n",
       "Name: family_size, dtype: int64"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5,1,'survived by famlily size ')"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEFCAYAAAD36MwKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAGGpJREFUeJzt3X2UVPWd5/H3BxpsVx6Eth0JsAEfYlbdECaogMwoKGSzgBLjAzqciIkPYYdIjHEPmWhCPHLUTExinpxlkpxJWE08wmgUHJQnHTFBA0MaDepEHEeaEGhAQZYGkf7uH3XRpmmo6qK6q/vXn9c5dbj3d3/33u/tPnzq17+quqWIwMzM0tGl3AWYmVlpOdjNzBLjYD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+462pqkk4Ezs9/5vwADylxSW/kbYGVEnAecKem/lbug1iTpWGA1H2RZq2Rcew/2znqrgs3Afdlye/8dldp9wFfLXUQZXAj0kfSvwF8B/1HmetrK20APSV2BY4F3y1xPq4qI+oj4GFCbNbVKxrX30KgCDtylaCfQt4y1tJmI+GNEvCDp00ADneSGapKuBmqAdeWupQyqgbqI+Gtyo/VRZa6nrTwC/A9gPfByRKwvcz1trVUyrr0He95bFaRK0sXATcDEiHiv3PW0kQnkRq6/Aj4haXqZ62lLO/ng/kmvA/3LWEtb+ipwf0QMAvpKGlnmetpaq2Rcew/2TnmrAkknAbcCEyLinXLX01Yi4uqIGAVMBlZHxA/LXVMbWg0cuGfIqeTCvTPoCezJlvcCPcpYSzm0Ssa192DvrLcquAboBzwpaYWkz5W7IGtdEfFbYJuk3wGvRsQL5a6pjfwImCbpt+Tm2DvL//EDWiXj/MlTM7PEtPcRu5mZtZCD3cwsMQ52M7PEONjNzBLjYDczS4yD3cwsMf8fGXrqtOun/GEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.hist([df1,df2])\n",
    "\n",
    "plt.legend(('遇难','幸存'),loc = 'best')\n",
    "plt.title('survived by famlily size ')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 散点图Scatter Plots, subplots"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "max_age =  80.0\n",
      "8\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'计数')"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAJNCAYAAAB9bnI7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAA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4Z0f2tXXTisLY7/fTT+dSnPsUvf/lL3vSmNzFz5kzWrl3Lvvvuy7777stXv/rV7bbfunUrl112GUceeSS//e1veeMb3ziidfezZ0ySJHWE+fPn89GPfhSAt7zlLXzta1/j1a9+NVdddRWTJk3ivvvu47zzzuO9730vn/jEJ1i2bBkbNmzg8MMPp7e3l8cff5ze3t4Rr8ueMY0ZI/0/KRj+/6YkSWPfG9/4RnbddVcArrrqKm699Vbuuece7r77bp7//Oezzz77cNlll/Ff//VffP3rX+cLX/gCt99+OzfeeCMPPPAA//zP/8xHP/pRjjjiiBGtyzAmSZLa3h133MHixYuZPXs2M2bM4OSTT2bXXXdl8+bNzJs3j913351HH32Uf/iHf+CQQw6ht7eX1atXc8opp3DQQQexdOlS3v72t3P44YePeG2GMUmS1PZe8IIXcM455zB//nx+97vfsXLlSnp7e1m/fj3Lli3jkUce4c1vfjN/+Zd/yVve8hZWrlzJIYccwu23384uu+zChAkTmDx58qjUZhiTJEltb9KkSUyaNAmABx54gEsuuYSZM2eycOFCDjvsMFatWkVEsPvuuzNr1iyWLFnC3nvvzVe/+lWuueYaHnjgAX72s5/x/e9/n912221Ea3MAvyRJ6jh33303H/nIR3jlK1/JuHHjWL9+PZMmTeLd73431157LVdffTVbtmxh4cKFfOlLX+Jtb3sby5cvH/EgBvaMSZKkmpX48lRfXx+f+MQnuPfee5k2bRpvetObeOc73wnAfffdx7777suVV17Jeeedx/Tp01m8eDE/+MEPWLRoEXvssQcPPPAAN9xwA29961t517veNaK1GcYkSVLb+/a3v81vfvMb7rnnHpYsWcI555zDtm3bePjhh+nr62P9+vVceumlnHzyyQCMHz+ebdu2sXDhQt72trcBjXtROrWFJEnSUzB//nzmz58PwIknnsiJJzZ65/r6+ujr62PChD+NRK973eu2exwRg273dBnGJElSxxo3bhzjxpUdQu8AfkmSpIIMY5IkSQUZxiRJkgoyjEmSJA3iN7/5TS3HcQC/JEmq10VTR3h/G4e1WWaSmYwbN47rr7+eZcuWcckll5CZ9PX1MX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F2AJI2ieRGxgMbg/U9X2ezgiLimWj+Jxg2zTwQuB6bRCGcvrJZfCrym7qIldRbDmKS2lZnXAtc2t0XEjZl5UtPjg4BXAc8AnkXjisGVNELazzLzkfoqltSJDGOSOs2UAY9/C1wB/P/V8mcyc0tEvBm4KSJmZea6uouU1DkcwC9JOxAR4zOzt3QdktqbYUySJKkgv00pSZJUkGFMkiSpIMOYJElSQYYxSZKkgv4PwmxlapPp0DEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 720x720 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig,axes = plt.subplots(2,1,figsize=figsize_with_subplots)\n",
    "\n",
    "df1 = df_train[df_train['survived']==0]['age']\n",
    "df2 = df_train[df_train['survived']==1]['age']\n",
    "max_age = max(df_train['age_fill'])\n",
    "\n",
    "print('max_age = ',max_age)\n",
    "print(int(max_age/10))\n",
    "\n",
    "# 年龄－幸存 散点图关系\n",
    "axes[0].scatter(df_train['survived'],df_train['age_fill'])\n",
    "\n",
    "axes[1].hist([df1,df2])\n",
    "axes[1].legend(('遇难','幸存'))\n",
    "axes[1].set_title('不同年龄的分布')\n",
    "axes[1].set_xlabel('年龄')\n",
    "axes[1].set_ylabel('计数')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
